package com.woniuxy.service.impl;

import com.woniuxy.dao.RbacMenuDao;
import com.woniuxy.entity.RbacMenu;
import com.woniuxy.service.RbacMenuService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * @author: wgt
 * Date: 2021/11/14:20:50
 * Description:
 */
public class RbacMenuServiceImpl implements RbacMenuService {
    ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
    RbacMenuDao rbacMenuDao=applicationContext.getBean("rbacMenu",RbacMenuDao.class);

    @Override
    public List<RbacMenu> findAll(int id) {
        return rbacMenuDao.findAll(id);
    }

    @Override
    public int save(RbacMenu rbacMenu) {
        return rbacMenuDao.save(rbacMenu);
    }

    @Override
    public int deleteById(RbacMenu id) {
        return rbacMenuDao.deleteById(id);
    }

    @Override
    public int update(RbacMenu rbacMenu) {
        return rbacMenuDao.update(rbacMenu);
    }
}
